<?php 
if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 
require_once('FCKeditor/fckeditor.php');
/** 5.         * DK_FCKeditor extends FCKeditor 6.         * Author: Daker.W 7.         * Create Time: 2010/08/13 8.         **/
class DK_FCKeditor extends FCKeditor {
	function DK_FCKeditor($config = array('InstanceName'=>''))
	{ 
		$this->CI =& get_instance();
		if ( ! in_array('fckeditor_lang'.EXT, $this->CI->lang->is_loaded, TRUE))
		{
			$this->CI->lang->load('fckeditor');
		}
		$this->local_time = time();
		if (count($config) > 0){ 
			$this->initialize($config);
		}
		parent::__construct($this->InstanceName);
		$this->BasePath         = $this->CI->config->item('fck_base_path');//配置文件中配置的FCK的
		$this->ToolbarSet       = $this->CI->config->item('fck_toolbarset_default');//配置的默认样
		log_message('debug', "FCKeditor Class Initialized");
	}
	function initialize($config = array()){ 
		foreach ($config as $key => $val) {
			if (isset($this->$key)) 
			{ 
			 $this->$key = $val;
			}
		 }
	 } 
}
 //End Class 44.?>
